// 根据姓名和身份证号查询当前病人的账单信息
var message = {
    name: '张三',
    number: 1234,
    sex: '女',
    age: 12,
    pay: [
        {
            payBianHao: 1,
            pills: [
              {
                  name: '阿司匹林',
                  number: '1221',
                  size: '一盒12粒',
                  money: '20.0',
                  unit: '粒',
                  num: '10',
                  totalMoney: '200.0'
              },
              {
                  name: '阿司匹林23',
                  number: '333',
                  size: '一盒19粒',
                  money: '27.0',
                  unit: '粒',
                  num: '10',
                  totalMoney: '270.0'
              }
           ],
          pillTotalMoney: '470.0',
          programs: [
              {
                  number: '1234',
                  name: '查肝',
                  unit: '次',
                  money: '120.0',
                  num: '1',
                  totalMoney: '120.0'
              },
              {
                  number: '123422',
                  name: '查血',
                  unit: '次',
                  money: '190.0',
                  num: '1',
                  totalMoney: '190.0'
              }
          ],
          programTotalMoney: '310.0',
          total: '780.0'
      },
      {     
            payBianHao: 2,
            pills: [
              {
                  name: '999感冒灵11',
                  number: '1221',
                  size: '一盒12粒',
                  money: '20.0',
                  unit: '粒',
                  num: '10',
                  totalMoney: '200.0'
              },
              {
                  name: '999感冒灵22',
                  number: '333',
                  size: '一盒19粒',
                  money: '27.0',
                  unit: '粒',
                  num: '10',
                  totalMoney: '270.0'
              }
           ],
          pillTotalMoney: '470.0',
          programs: [
              {
                  number: '111',
                  name: '查肝',
                  unit: '次',
                  money: '120.0',
                  num: '1',
                  totalMoney: '120.0'
              },
              {
                  number: '333',
                  name: '查血',
                  unit: '次',
                  money: '190.0',
                  num: '1',
                  totalMoney: '190.0'
              }
          ],
          programTotalMoney: '310.0',
          total: '780.0'
      }
      
    ]

}

Mock.mock('/pages/payOut/getPatientMessage', 'post', function (e) {
    console.log('查询账单信息时后端接收到的病人名字身份证：')
    console.log(e.body)
    return message
})

// 退药
Mock.mock('/pages/payOut/payOutPill', 'post', function(e) {
    console.log('后端接收退药参数：')
    console.log(e.body)
    return {success: '退药成功'}
})

// 退项目
Mock.mock('/pages/payOut/payOutProgram', 'post', function(e) {
    console.log('后端接收退药参数：')
    console.log(e.body)
    return {success: '退药成功'}
})